package part17_策略模式_鸭子问题.策略加工厂解决ifelse.strategy;

import part17_策略模式_鸭子问题.策略加工厂解决ifelse.pojo.LeaveForm;

/**
 * @ClassName: AuditStrategyImpl_01
 * @Author: AllenSun
 * @Date: 2023/2/11 下午10:16
 */
public class AuditStrategyImpl_04 implements AuditStrategy {
    @Override
    public boolean isSupport(LeaveForm form) {
        return form.getDays()==1 && form.getType()==0;
    }

    @Override
    public void audit(LeaveForm leaveForm) {
        System.out.println(leaveForm);
        System.out.println("一天病假无需审批自动通过");
    }

    @Override
    public int getPriority() {
        return 0;
    }

    @Override
    public String getName() {
        return "一天以下病假审批规则";
    }
}
